<?php
use yii\bootstrap\ActiveForm;
?>
<link rel="stylesheet" href="/static/dist/css/AdminLTE.min.css" type="text/css">
<link rel="stylesheet" href="/static/bootstrap/css/bootstrap.min.css" type="text/css">
<link rel="stylesheet" href="/static/plugins/datatables/jquery.dataTables.css" type="text/css">
<link rel="stylesheet" href="/static/css/admin.css" type="text/css">
<link rel="stylesheet" href="/static/jBox/Skins/Metro/jbox.css" type="text/css">
<link rel="stylesheet" href="/static/plugins/daterangepicker/daterangepicker.css" type="text/css">
<link rel="stylesheet" href="/static/plugins/datepicker/datepicker3.css" type="text/css">
<link rel="stylesheet" type="text/css" href="../static/app/goods-keyword/css/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="../static/app/goods-keyword/css/jquery.dropdown.css">
<style>
    .ul_tree_display{
        display: none;
    }
    .tr_tree_display{
        display: none;
    }
    .dataTables_length{
        margin-top: 10px;
    }
    .dataTable>tbody>tr>td{
        vertical-align: middle;
        font-size: 0.8em;
        padding: 8px 18px;
    }
    .dataTable>thead>tr>th{
        vertical-align: middle;
        font-size: 0.8em;
    }
    
/* 调整模态框让富文本正常显示 */
    .modalBox{
      /*  bottom: auto !important;*/
        margin: 0 auto !important;
    }
    .modalBox .modal-dialog{
        margin-top: 10px !important;
    }
    .modalBox .form-group{
        margin-bottom:10px !important;
    }
    .modalBox .modal-header{
        padding: 10px 15px !important;
    }
    .modalBox .form-group .form-control{
      /*  height: 30px !important;
        padding: 0 12px !important;*/
    }
    .modalBox button{
        height: 30px;
        line-height: 1!important;
    }
    .modalBox .col-md-12{
        margin-left: -30px !important;
    }
</style>
<div class="tabs-panel">
    <div class="row">
        <div class="col-xs-12">
            <div class="box">
                <div class="box-header">
                    <!--<h3 class="box-title">Hover Data Table</h3>-->
                    <label>品牌名称：</label>
                    <input class="depart-input" name="search_brand_name" id="search_brand_name" type="text" placeholder="" style="width: 300px">&nbsp;
                    <label>标签：</label>
                    <select id="tag" name="tag" class="depart-input" style="width: 150px">
                        <option value="">请选择</option>
                        <?php foreach($tag as $value){?>
                            <option value="<?= $value['tag']?>"><?= $value['tag']?></option>
                        <?php }?>
                    </select>&nbsp;

                    <button type="button" class="btn btn-primary depart-modal" id="select_button" style="width: 100px;">查询</button> &nbsp;
                    <button type="button" class="btn btn-warning depart-modal" id="reset_button" style="width: 100px;">重置</button>
                </div>
                <!-- /.box-header -->
                <div class="box-body">
                    <button type="button" class="btn btn-success depart-modal" id="add_button" style="width: 100px;">添加</button>
                    <table id="table_list" class="display">
                        <thead>
                            <tr>
                                <th style="width: 15%">操作</th>
                                <th style="width: 15%">ID</th>
                                <th style="width: 30%">品牌名称</th>
                                <th style="width: 30%">说明</th>
                                <th style="width: 10%"><?=TITLE_STATUS?></th>
                            </tr>
                        </thead>
                        <tbody></tbody>
                    </table>
                </div>
            </div>
        </div>
    </div>

    <div class="modal fade" id="myModal" aria-labelledby="myModalLabel" aria-hidden="true">
        <div class="modal-dialog" style="width:75%;">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal" aria-hidden="true">
                        &times;
                    </button>
                    <h4 class="modal-title" id = "myModalLabel" name = "myModalLabel">
                        日志详细内容
                    </h4>
                </div>
                <div class="modal-body" >
                    <form action="/goods-brand/brand-save" method="post" id="group_form">
                        <div class="box-body">
                            <div class="col-md-12" style="margin-bottom: 20px;">
                                <label for="brand_name" style="text-align:right;" class="col-sm-2"><span class="text-danger">* </span>品牌名称</label>
                                <div class="col-sm-4">
                                	<input type="text" style="width: 300px;" class="form-control" name="brand_name" id="brand_name" placeholder="品牌名称">
                                </div>
                            </div>
                            <div class="col-md-12" style="margin-bottom: 20px;">
                            	<label for="brand_desc" style="text-align:right;" class="col-sm-2">说明</label>
                                <div class="col-sm-10">
                               		<textarea class="form-control" name="brand_desc" id="brand_desc" placeholder="说明 " style="width: 100%;"></textarea>
                                </div>
                            </div>

                            <div class="col-md-12" style="margin-bottom: 20px;">
                            	<label for="exampleInputEmail1" style="text-align:right;" class="col-sm-2"><span class="text-danger">* </span>状态</label>
                                <div class="col-sm-4">
                                	<select name="use_flg" id="use_flg" class="form-control" style="width: 200px;">
                                        <option value="1">启用</option>
                                        <option value="0">禁用</option>
                                	</select>
                                </div>
                            </div>
                        </div>
                        <input type="hidden" name="current_mode" id="current_mode">
                        <input type="hidden" name="brand_id" id="brand_id">
                        <!-- /.box-body -->
                    </form>
                    <div style="display: none">
                        <?php $form = ActiveForm::begin(['id'=>'upload_form_update','action'=>'/common/img-upload'],['options' => ['enctype' => 'multipart/form-data']]) ?>
                        <?= $form->field($model, 'img_url')->fileInput(['class' => 'upload_file_ot']) ?>
                        <?php ActiveForm::end() ?>
                    </div>
                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
                    <a type="button" class="btn btn-primary ajax_submit">提交</a>
                </div>
            </div><!-- /.modal-content -->
        </div><!-- /.modal -->
    </div>
    <input type="hidden" name="imageBathUrl" id="imageBathUrl" value="<?php echo Yii::$app->params['imageBathUrl'] . '/' ?>">
    <input name="class_len" id="class_len" value="0" type="hidden"/>
	<input name="class_len_2" id="class_len_2" value="0" type="hidden"/>
</div>
<?php include ('../views/seo/seo-modal.php');?>
<!-- 固定js -->
<script type="text/javascript" src="/static/plugins/jQuery/jquery-2.2.3.min.js"></script>
<script type="text/javascript" src="/static/bootstrap/js/bootstrap.min.js"></script>
<script type="text/javascript" src="/static/plugins/datatables/jquery.dataTables.min.js"></script>
<script type="text/javascript" src="/static/plugins/datatables/dataTables.bootstrap.min.js"></script>
<script type="text/javascript" src="/static/jBox/jquery.jBox-2.3.min.js"></script>
<script type="text/javascript" src="/static/jBox/i18n/jquery.jBox-zh-CN.js"></script>
<script type="text/javascript" src="/static/plugins/moment/moment.min.js"></script>
<!-- 图片上传插件用 -->
<script type="text/javascript" src="/static/plugins/jquery.form.js"></script>
<!-- 图片显示用 -->
<script type="text/javascript" src="/static/plugins/layer/layer.js"></script>
<!-- 富文本框插件 -->
<script type="text/javascript" src="/static/plugins/xheditor/xheditor-1.2.2.min.js"></script>
<script type="text/javascript" src="/static/plugins/xheditor/xheditor_lang/zh-cn.js"></script>
<!-- 搜索选择框 -->
<script type="text/javascript" src="../static/app/goods-keyword/js/jquery.dropdown.js"></script>
<script type="text/javascript" src="../static/app/goods-keyword/js/mock.js"></script>
<!-- 自定义js -->
<script type="text/javascript" src="/static/app/global.js?version=<?=Yii::$app->params['version']?>"></script>
<script type="text/javascript" src="/static/app/goods_brand/list.js?version=<?=Yii::$app->params['version']?>"></script>
<script>
var keyword_data = <?=(is_array($keyword) ? json_encode($keyword) : '')?>;
</script>